home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / programr / listings / ptv2n5 / bitmap.bas < prev    next >
BASIC Source File  |  1991-09-09  |  992b  |  40 lines

  1. Sub Command2_Click ()        ' "CREATE A BITMAP" BUTTON
  2.  
  3.   ' Creates an image on a bitmap file which can be
  4.   ' manipulated and printed with Windows Paintbrush.
  5.  
  6.   Screen.MousePointer = 11   ' HOURGLASS CURSOR
  7.  
  8.   Picture1.ScaleMode = 5     ' SCALE IN INCHES
  9.   
  10.   Picture1.AutoRedraw = -1   ' IT'S A BITMAP PICTURE
  11.   
  12.   Picture1.Cls
  13.  
  14.   Picture1.DrawWidth = 3     ' DRAW CIRCLES
  15.   Picture1.Circle (2, 2), 1.5
  16.   Picture1.DrawWidth = 1
  17.   Picture1.Circle (2, 2), 1.45
  18.  
  19.   Pi# = 3.1415926537         ' DRAW LISSAJOUS FIGURE
  20.   x = 2
  21.   y = 2 + 1
  22.   Picture1.PSet (x, y)
  23.   For t# = 0 To Pi# * 32.1 Step Pi# / 64
  24.     x = 2 + Sin(t#)
  25.     y = 2 + Cos(t# * 1.0625)
  26.     Picture1.Line -(x, y)
  27.     s% = DoEvents()
  28.   Next t#
  29.  
  30.   m$ = "PC Techniques"       ' PRINT LABEL
  31.   Picture1.CurrentY = 3.05
  32.   Picture1.CurrentX = 2 - Picture1.TextWidth(m$) / 2
  33.   Picture1.Print m$
  34.  
  35.   SavePicture Picture1.Image, "EXAMPLE1.BMP"
  36.  
  37.   Screen.MousePointer = 0    ' NORMAL CURSOR
  38.   
  39. End Sub
  40.